{__NOLAYOUT__}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp">

    <link rel="stylesheet" href="/admin/static/h-ui/css/H-ui.min.css">
    <link rel="stylesheet" href="/admin/static/h-ui.admin/css/H-ui.login.css">
    <link rel="stylesheet" href="/admin/static/h-ui.admin/css/style.css">
    <link rel="stylesheet" href="/admin/lib/Hui-iconfont/1.0.8/iconfont.css">

    <title>后台登录</title>
    <meta name="keywords" content="blog,博客,troublezzb,个人网站">
    <meta name="description" content="zzb的个人博客网站">
    <style>
        .capture_img{cursor: pointer;width: 160px;}
    </style>
</head>
<body>

<div class="header"><span class="title" data-text="后台管理系统">后台管理系统</span></div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form class="form form-horizontal" action="{:url('login')}" method="post">
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8">
                    <input id="username" name="username" type="text" placeholder="账户" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input id="password" name="password" type="password" placeholder="密码" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <div class="formControls col-xs-3 col-xs-offset-3">
                    <input class="input-text size-L" type="text" placeholder="验证码" name="verification_code" style="width:150px;">
                </div>
                <div class="col-xs-5">
                    <img src="{:captcha_src()}" class="capture_img" onClick="this.src='{:captcha_src()}?'+Math.random();">
                </div>
            </div>
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <label for="online">
                        <input type="checkbox" name="online" id="online" value="">使我保持登录状态</label>
                </div>
            </div>
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <input type="button" class="btn btn-success radius size-XL js_submit" value="登录">
                    <input type="reset" class="btn btn-default radius size-XL" value="取消">
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">Copyright zzb</div>
<script src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script src="/admin/static/h-ui/js/H-ui.min.js"></script>
<script src="/admin/lib/layer/2.4/layer.js"></script>
<!--请在下方写此页面业务相关的脚本-->
<script>
    $(function(){
        //提交表单
        $(document).on('click', '.js_submit', function(e){
            $form = $(this).parents('form');
            $.ajax({
                type: $form.attr('method'),
                url: $form.attr('action'),
                data: $form.serialize(),
                success: function(response){
                    if (response.code == 1) {
                        window.location.href = response.url;
                    }else{
                        layer.msg(response.msg,{icon:0,time:3000});
                        $('.capture_img').trigger('click');
                    }
                },
                error: function(data){
                    layer.msg('发送失败！',{icon:0,time:3000});
                    $('.capture_img').trigger('click');
                }
            });
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>